package com.corpgovernment.organization.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import com.corpgovernment.common.enums.DeleteStatusEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

/**
 * 用户12306账号关系实体
 *
 * @author wangyujue
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "mb_user_12306_relation")
public class User12306Relation extends BaseEntity {

    /**
     * 主键
     */
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @OperateLogFieldDesc(value = "主键")
    private Long id;

    /**
     * 用户id
     */
    @Column(name = "uid")
    @OperateLogFieldDesc(value = "用户id")
    private String uid;

    /**
     * 12306账户
     */
    @Column(name = "account")
    @OperateLogFieldDesc(value = "12306账户")
    private String account;

    /**
     * 删除状态
     */
    @Column(name = "is_deleted")
    @OperateLogFieldDesc(value = "删除状态", type = DeleteStatusEnum.class)
    private Boolean isDeleted;

    /**
     * 供应商code
     */
    @Column(name="supplier_code")
    @OperateLogFieldDesc("供应商编码")
    private String supplierCode;

    @Column(name = "account_pwd")
    @OperateLogFieldDesc("12306账号密码")
    private String accountPwd;
}
